Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix iteminfo tests and refactor pocket display #40314

Merged
merged 1 commit into from
May 8, 2020

Conversation

wapcaplet
Copy link
Contributor

Summary

SUMMARY: Infrastructure "Fix iteminfo tests and refactor pocket display"

Purpose of change

Several iteminfo_test cases were failing with nested containers due to not having an iteminfo_parts flag to toggle the display of pocket info and their nested contents.

Describe the solution

In the item info display, pocket "general_info" display is now shown only if the new iteminfo_parts::DESCRIPTION_POCKETS flag is given, and contents info is only added if iteminfo_parts::DESCRIPTION_CONTENTS is given.

These changes allow 3 of the formerly failing iteminfo_test assertions to pass. The other 2 formerly failing tests related to BASE_RIGIDITY, which is handled at the pocket level now), so the "item rigidity" tests were simply removed (as they will need a complete rewrite anyhow).

Describe alternatives you've considered

Hands in pockets

Testing

tests/cata_test [iteminfo]

Additional context

I plan to follow up with some new iteminfo test cases covering pockets and containers, but for now my goal was to simply re-align the cogs.

In the item info display, pocket "general_info" display is now shown
only if the new iteminfo_parts::DESCRIPTION_POCKETS flag is given,
and contents info is only added if DESCRIPTION_CONTENTS is given.

These changes allow 3 of the formerly failing iteminfo_test assertions
to pass. The other 2 formerly failing tests related to BASE_RIGIDITY,
which is handled at the pocket level now), so the "item rigidity" tests
were simply removed.
@ZhilkinSerg ZhilkinSerg added [C++] Changes (can be) made in C++. Previously named `Code` Code: Tests Measurement, self-control, statistics, balancing. Items: Containers Things that hold other things labels May 8, 2020
@ZhilkinSerg ZhilkinSerg merged commit e0500d3 into CleverRaven:master May 8, 2020
@wapcaplet wapcaplet deleted the pocket-info branch May 24, 2020 23:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[C++] Changes (can be) made in C++. Previously named `Code` Code: Tests Measurement, self-control, statistics, balancing. Items: Containers Things that hold other things
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants